package com.delivery.mapper;

import com.delivery.entity.SetmealDish;
import com.delivery.vo.ComboContainedDishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    Integer countByDishId(Long DishId);

    void insert(SetmealDish setmealDish);

    /**
     * 根据套餐ID删除套餐菜品关系
     * @param setmealId
     */
    void deleteBySetmealId(Long setmealId);

    /**
     * 根据套餐ID批量删除套餐菜品关系
     * @param setmealIds
     */
    void deleteBatchBySetmealId(List<Long> setmealIds);

    /**
     * 根据套餐ID查询套餐包含的菜品 连表 dish 拿到菜品信息
     * @param setmealId
     * @return
     */
    List<ComboContainedDishVO> selectContainedDishesByComboId(Long setmealId);
}
